Allow case insensitive comparisons when matching on format/filter names.
authorrobertl <robertl@f51c46e8-681c-474f-0cfe-069cfd0219fb>
Fri, 5 May 2006 23:00:42 +0000 (23:00 +0000)
committerrobertl <robertl@f51c46e8-681c-474f-0cfe-069cfd0219fb>
Fri, 5 May 2006 23:00:42 +0000 (23:00 +0000)
gpsbabel/filter_vecs.c
gpsbabel/vecs.c

index 5840c31bc4b670351ebc3b5b839b19d144589650..23163c422b9911f640297d22801adcd2eac2b6f3 100644 (file)
@@ -129,7 +129,7 @@ find_filter_vec(char *const vecname, char **opts)
                arglist_t *ap;
                char *res;
 
-               if (strcmp(svecname, vec->name)) {
+               if (case_ignore_strcmp(svecname, vec->name)) {
                        vec++;
                        continue;
                }
index b72dfbc39ebcb4404be16d3f973ff86ee9c5299a..6c7fd87c70764f84760ba847996dcb9a1343cee5 100644 (file)
@@ -630,7 +630,7 @@ disp_vec_options(const char *vecname, arglist_t *ap)
                if (*ap->argval && ap->argval) {
                        printf("options: module/option=value: %s/%s=\"%s\"", 
                                vecname, ap->argstring, *ap->argval);
-                       if (ap->defaultvalue && (strcmp(ap->defaultvalue, *ap->argval) == 0)) 
+                       if (ap->defaultvalue && (case_ignore_strcmp(ap->defaultvalue, *ap->argval) == 0)) 
                                printf(" (=default)");
                        printf("\n");
                }
@@ -650,7 +650,7 @@ find_vec(char *const vecname, char **opts)
                arglist_t *ap;
                char *res;
 
-               if (strcmp(svecname, vec->name)) {
+               if (case_ignore_strcmp(svecname, vec->name)) {
                        vec++;
                        continue;
                }
@@ -702,7 +702,7 @@ find_vec(char *const vecname, char **opts)
                arglist_t *ap;
                char *res;
 
-               if (strcmp(svecname, svec->name)) {
+               if (case_ignore_strcmp(svecname, svec->name)) {
                        svec++;
                        continue;
                }
@@ -856,7 +856,7 @@ sort_and_unify_vecs(int *ctp)
                /* Reset file type to inherit ff_type from xcsv for everything
                 * except the xcsv format itself, which we leave as "internal"
                 */
-               if (strcmp(svec->name, "xcsv")) {
+               if (case_ignore_strcmp(svec->name, "xcsv")) {
                        svp[i]->vec->type = xcsv_file.type;
                        /* Skip over the first help entry for all but the
                         * actual 'xcsv' format - so we don't expose the